FROM python:2.7
WORKDIR /usr/src/app

RUN apt update && \
apt install -y git libseccomp-dev rake sudo strace && \
git clone https://github.com/quark-zju/lrun.git && \
cd lrun && \
make install && \
cd .. && \
rm -rf lrun && \
groupadd -g 1000 docker && useradd -u 1000 -g docker docker

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

ENTRYPOINT ["/bin/sh", "./docker-entrypoint.sh"]
